package com.splant.android.smart.UILevel.Utils;



/**
 * Created by Administrator on 2017/4/6.
 */

public class sPlantUitl {



    public static int getWaterType(String deviceId)
    {
        int type=3;
        String proType=deviceId.substring(0,2);

        if (proType.equals("BA")||proType.equals("BC"))
        {
          type=1;
        }
        else if (proType.equals("B7"))
        {
            if (deviceId.length()>12)
            {
                String typeStr=deviceId.substring(11,12);

                if (typeStr.equals("0"))
                    type=3;
                else if (typeStr.equals("4"))
                {
                    type=2;
                }
                else if (typeStr.equals("1")||typeStr.equals("2")||typeStr.equals("3"))
                {
                    type=1;
                }
            }

        }
        else
        {

        }
        return type;
    }

}